package com.trade.service.impl;

import java.util.List;

import com.trade.dao.ISaleOrderDao;
import com.trade.model.SaleOrder;
import com.trade.service.ISaleOrderService;

/**
 * 
 * 订单的业务实现类
 *
 * @author	chengpeng.zhang
 * @version           1.0
 * @since             2012-11-16
 */
public class SaleOrderServiceImpl implements ISaleOrderService {
	private ISaleOrderDao saleOrderDao;
	
	public ISaleOrderDao getSaleOrderDao() {
		return saleOrderDao;
	}

	public void setSaleOrderDao(ISaleOrderDao saleOrderDao) {
		this.saleOrderDao = saleOrderDao;
	}

	@Override
	public void save(SaleOrder order) {
		saleOrderDao.save(order);
	}

	@Override
	public SaleOrder getSaleOrder(long saleOrderId) {
		return saleOrderDao.load(saleOrderId);
	}

	@Override
	public List<SaleOrder> getAllSaleOrders() {
		return saleOrderDao.list();
	}

	
}
